<template>
  <div id="" class="changeName">
    <h2 v-title="'更换手机'"></h2>
    <!-- <h2>请输入手机号</h2> -->
    <div class="inputDiv">
      <input type="text" name="" v-model="mobile" placeholder="请输入手机号码">
    </div>
    <div class="mt20">
      <button type="button" name="button" class="blockBtn" @click="nextMobile">下一步</button>
    </div>
  </div>
</template>
<script>
import {Toast} from 'mint-ui';
import {mapState,mapMutations} from 'Vuex';
export default {
  name: "",
  data: () => ({
    mobile:''
  }),
  methods: {
    nextMobile() {
      let mobile = this.mobile;
      if(mobile==''){
        Toast('手机号不能为空');
        return false;
      }
      this.$router.push({path:'/yzmCode',query:{mobile:mobile}});
    }
  },
  computed: {
    ...mapState({
      userInfo:state=>state.login.userInfo,
    })
  },
  mounted() {
    //do something after mounting vue instance
    console.log(this.userInfo);
    this.mobile = this.userInfo.mobile;
  }
}
</script>
<style lang="scss" scoped src="./memberSetFile.scss"></style>
